package com.netease.qa.biz.enums;

/**
 * @author zoudongdong
 * @date 2018/2/28
 */
public enum TestCaseStatus {
    Deleted(0, "已删除"),
    Valid(1, "有效");

    private int value;
    private String desc;

    TestCaseStatus(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static String getDesc(int value) {
        if (value == TestCaseStatus.Valid.value) {
            return TestCaseStatus.Valid.desc;
        } else if (value == TestCaseStatus.Deleted.value) {
            return TestCaseStatus.Deleted.desc;
        } else {
            return null;
        }
    }
}
